﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DMSP.ascx.cs" Inherits="usercontrol_DMSP" %>

<asp:SqlDataSource ID="SqlDataSource2" runat="server" 
    ConnectionString="<%$ ConnectionStrings:COMPUTERConnectionString2 %>" 
    SelectCommand="SELECT [MaDM], [TenDM] FROM [DM_SanPham]">
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="MaDM" DataSourceID="SqlDataSource2" Width="200px" 
    BackColor="White">
    <Columns>
        <asp:HyperLinkField DataNavigateUrlFields="MaDM" 
            DataNavigateUrlFormatString="~/sanphamtheoloai.aspx?MaDM={0}" 
            DataTextField="TenDM" HeaderText="Danh Mục Sản Phẩm" >
        <HeaderStyle BackColor="Red" Font-Bold="True" Font-Names="Arial" 
            Font-Size="Large" ForeColor="White" HorizontalAlign="Center" />
        <ItemStyle BackColor="White" Font-Names="Arial" Font-Size="Small" 
            ForeColor="White" Height="20px" />
        </asp:HyperLinkField>
    </Columns>
    <EmptyDataTemplate>
        &nbsp;&nbsp;&nbsp;
        <asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True" ForeColor="Blue" 
            NavigateUrl='<%# "~/SanPhamTheoLoai.aspx?MaDM" + Eval("MaDM") %>' 
            Text='<%# Eval("TenDM") %>' Font-Strikeout="False" Font-Underline="False"></asp:HyperLink>
    </EmptyDataTemplate>
</asp:GridView>

